package com.lz.library.adapter

import android.view.ViewGroup
import androidx.annotation.LayoutRes

/**
 *  author: you : 2020/4/25
 */
abstract class SimpleAdapter<T>(initData: List<T>? = null) : com.lz.library.adapter.BaseAdapter<T, SimpleViewHolder>(initData) {

    override fun onCreateItem(parent: ViewGroup, viewType: Int) = SimpleViewHolder(layoutInflater.inflate(getLayoutResId(viewType), parent, false))

    @LayoutRes
    protected abstract fun getLayoutResId(viewType: Int): Int

}